<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <AssemblyName>ILCompiler.TypeSystem.Tests</AssemblyName>
    <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
    <Configurations>Debug;Release;Checked</Configurations>
    <!-- This seems to be required for supporting assemblies to be copied into the output -->
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    <TestRunnerAdditionalArguments>-notrait category=failing</TestRunnerAdditionalArguments>
    <!-- xunit.runner.visualstudio is restored for .NET Framework instead of Core-->
    <NoWarn>$(NoWarn);NU1701</NoWarn>
    <!-- By default the subdirectories containing CoreTestAssembly and ILTestAssembly would be 
         included in compilation of this project -->
    <EnableDefaultItems>false</EnableDefaultItems>
    <Platforms>AnyCPU;x64</Platforms>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    
    <!-- Avoids having to include InteropStateManager.cs to get files in Common/TypeSystem/Interop/IL building -->
    <DefineConstants>READYTORUN;$(DefineConstants)</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\ILCompiler.TypeSystem\ILCompiler.TypeSystem.csproj">
      <Private>True</Private>
    </ProjectReference>
    <!-- Make sure the test data gets built -->
    <ProjectReference Include="CoreTestAssembly\CoreTestAssembly.csproj">
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
      <OutputItemType>Content</OutputItemType>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Private>True</Private>
    </ProjectReference>
    <ProjectReference Include="ILTestAssembly\ILTestAssembly.ilproj">
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
      <OutputItemType>Content</OutputItemType>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Private>True</Private>
    </ProjectReference>
    <ProjectReference Include="TypeEquivalenceAssembly\TypeEquivalenceAssembly1.csproj">
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
      <OutputItemType>Content</OutputItemType>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Private>True</Private>
    </ProjectReference>
    <ProjectReference Include="TypeEquivalenceAssembly\TypeEquivalenceAssembly2.csproj">
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
      <OutputItemType>Content</OutputItemType>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Private>True</Private>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="../../Common/TypeSystem/MetadataEmitter/TypeSystemMetadataEmitter.cs" />
    <Compile Include="../../Common/TypeSystem/IL/ILReader.cs" />
    <Compile Include="../../Common/TypeSystem/Interop/IL/MarshalUtils.cs" Link="TypeSystem/Interop/IL/MarshalUtils.cs" />
    <Compile Include="../../Common/TypeSystem/Interop/IL/MarshalHelpers.cs" Link="TypeSystem/Interop/IL/MarshalHelpers.cs" />
    <Compile Include="../../Common/TypeSystem/Interop/IL/MarshallerKind.cs" Link="TypeSystem/Interop/IL/MarshallerKind.cs" />
    <Compile Include="../../Common/TypeSystem/Interop/InteropTypes.cs" Link="TypeSystem/Interop/InteropTypes.cs" />
    <Compile Include="../../Common/TypeSystem/IL/HelperExtensions.cs" Link="TypeSystem/IL/HelperExtensions" />
    <Compile Include="../../Common/Compiler/VectorFieldLayoutAlgorithm.cs" Link="Compiler/VectorFieldLayoutAlgorithm.cs" />
    <Compile Include="../../Common/Compiler/Int128FieldLayoutAlgorithm.cs" Link="Compiler/Int128FieldLayoutAlgorithm.cs" />
    <Compile Include="ArchitectureSpecificFieldLayoutTests.cs" />
    <Compile Include="CanonicalizationTests.cs" />
    <Compile Include="ConstraintsValidationTest.cs" />
    <Compile Include="GCPointerMapTests.cs" />
    <Compile Include="GenericTypeAndMethodTests.cs" />
    <Compile Include="CastingTests.cs" />
    <Compile Include="DefType.FieldLayoutTests.cs" />
    <Compile Include="HashcodeTests.cs" />
    <Compile Include="ILDisassemblerTests.cs" />
    <Compile Include="InterfacesTests.cs" />
    <Compile Include="RuntimeDeterminedTypesTests.cs" />
    <Compile Include="SignatureTests.cs" />
    <Compile Include="SyntheticVirtualOverrideTests.cs" />
    <Compile Include="SyntheticVirtualOverrideTests.DiagnosticName.cs" />
    <Compile Include="TestMetadataFieldLayoutAlgorithm.cs" />
    <Compile Include="TypeEquivalenceTests.cs" />
    <Compile Include="TypeNameParsingTests.cs" />
    <Compile Include="UniversalGenericFieldLayoutTests.cs" />
    <Compile Include="ValueTypeShapeCharacteristicsTests.cs" />
    <Compile Include="VirtualFunctionOverrideTests.cs" />
    <Compile Include="InstanceFieldLayoutTests.cs" />
    <Compile Include="StaticFieldLayoutTests.cs" />
    <Compile Include="TestTypeSystemContext.cs" />
    <Compile Include="VirtualStaticInterfaceMethodTests.cs" />
    <Compile Include="WellKnownTypeTests.cs" />
    <Compile Include="ExceptionStringTests.cs" />
    <Compile Include="MarshalUtilsTests.cs" />
  </ItemGroup>
</Project>
